fix: verify WWPGD commit pins at every shared adapter boundary - #132
Open
charlesmartin14 wants to merge 3 commits into
Open
fix: verify WWPGD commit pins at every shared adapter boundary#132charlesmartin14 wants to merge 3 commits into
charlesmartin14 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Ready for review. This PR supersedes the intent of #130 while fixing the enforcement, provenance, prefix-validation, and test-coverage defects identified in review. All six repository CI jobs pass on the exact head.
Root cause
PR #130 placed the assertion only in
run_scientific_single. The isolated Level Zero runner, Experiment 2, and direct adapter callers could bypass the check while still recording a requested pin in their manifests. Import-time provenance inwwgpt.wwcould also become stale in notebooks, and the bidirectional prefix comparison accepted malformed or dangerously short values.What changed
WWPGD_COMMIT_PINruntime verification at both shared adapter boundaries:resolved_commit.startswith(requested_pin).Truthful provenance
Manifests now distinguish runtime verification from installation pinning:
wwpgd_resolved_commitwwpgd_commit_pin_requestedwwpgd_commit_pin_verifiedwwpgd_commit_pin_statuswwpgd_dependency_pinned = falseThe provenance object is live with respect to the environment. A notebook that sets or clears
WWPGD_COMMIT_PINafter importingwwgpt.wwrecords and enforces the current value rather than stale import-time state.Compatibility
When
WWPGD_COMMIT_PINis unset or empty, behavior remains unchanged. This PR changes no optimizer mathematics, spectral target, dose, trust region, model weight, or default training behavior.Validation
Deterministic tests cover:
All six repository CI jobs pass on the exact head:
No scientific efficacy claim is made.